package com.cloudm.technician.ui.modules.cloudm_box.upload_pic

import android.os.Bundle
import com.cloudm.technician.R
import com.cloudm.technician.data.model.DeviceInfo
import com.cloudm.technician.extensions.addFragmentToActivity
import com.cloudm.technician.ui.base.BaseActivity

/**
 * 作者: wesley
 * 时间: 2017/12/22
 * 描述: 上传照片界面
 */
class UploadPicActivity : BaseActivity() {

    private var info: DeviceInfo? = null

    override fun handleBundle(bundle: Bundle) {
        info = bundle.getParcelable("info")
    }

    override fun initVariables() {

    }

    override fun initViews(savedInstanceState: Bundle?) {
        headerTitle = R.string.cloudm_pic
        displayHomeAsUpEnabled = true

        val fragment = manager.findFragmentById(
                R.id.common_content) as? UploadPicFragment ?: UploadPicFragment.newInstance(info)
        addFragmentToActivity(manager, fragment)
    }

    override fun initListener() {

    }
}